package com.example.inventoryserver;

import com.example.inventoryapi.InventoryApi;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: vince_zww
 * @date: 2020/7/28 19:49
 * @desceription:
 */
@RestController
public class InventoryService implements InventoryApi {


    @Override
    public String deductStock(@PathVariable("productId") Long productId,
                              @PathVariable("stock") Long stock) {
        System.out.println("对商品【productId=" + productId + "】扣减库存：" + stock);
        return "{'msg': 'success'}";
    }


}
